package com.fahai.web.vo;

import lombok.Data;

import javax.persistence.Transient;
import java.sql.Timestamp;

/**
 * @author sky
 * @version 1.0
 * @ClassName CallRecordVo
 * @Description
 * @date 2017-05-19 14:31:11
 * 通话记录的vo对象，接受参数和返回数据用
 */
@Data
public class CallRecordVo {
    private Integer id;          //通话流水日志id
    private String uname;
    private String uphone;

    private Long bid;


    private Integer callerDuration;


    private Byte lawyerStatus;

    private Byte userStatus;


    private String laPhone;

    private Integer userid;

    private String usPhone;


    private Long callId;
    private Integer lawyerid;
    private String lawyername;
    private String lawyerPhone;

    private String voiceBak;

    private String cacheUrl;


    private Timestamp bakTime;

    private Timestamp upUrlTime;


    private Integer isDispose;

    private Timestamp createTime;

    private Timestamp updateTime;

    private String bak;

    private String bak1;
    private String yzth;

    private String bak2;
    private Integer proid;
    private String proName;
    private Integer callStatus;
    private Integer rejectStatus;
    private String startTimeFromStr;  //查询开始时间
    private String startTimeToStr;    //查询结束时间
    private Integer callDurationMin;  //通话时长从
    private Integer callDurationMax;  //通话时长到
    private Integer calledDuration;//通话时长
    private Timestamp starttime;     //开始时间
    private Timestamp stoptime;      //通话结束时间
    private String startTimeTo;     //返回参数用
    private String startTimeFrom;     //返回参数用
    //0:用户 1:律师
    private Integer initiator;
    @Transient
    private String initiatorStr;

    public String getInitiatorStr() {
        if (null == this.initiator) {
            return "未知";
        }
        switch (this.initiator) {
            case 0:
                return "用户";
            case 1:
                return "律师";
            default:
                return "未知";
        }
    }

    @Transient
    public String callStatusStr;
    @Transient
    public String isEffectiveStr;

    public String getisEffectiveStr() {
        if (null == this.isEffective) {
            return "未知";
        }
        switch (this.isEffective) {
            case 0:
                return "无效";
            case 1:
                return "有效";
            default:
                return "未知";
        }
    }

    private String voiceUrl;
    //0:有效1:无效
    private Integer isEffective;      //这里读库的字段
    //0:未接通 1:接通
    private Integer isConnect;
    private Integer orderBy;
    public String isGoodCall;
    //通话发起时刻



    public Integer money ;//用户消费金额
    public Integer lawyerMoney;//律师收入金额

}